<template>
	<view class="tabbar">
		<u-tabbar :value="value1" @change="change1" :fixed="true" :placeholder="false" :safeAreaInsetBottom="true">
			<u-tabbar-item text="首页" icon="home" @click="click1"></u-tabbar-item>
<!-- 			<u-tabbar-item text="中间" icon="grid-fill" @click="click2"></u-tabbar-item> -->
			<u-tabbar-item text="我的" icon="account" @click="click3"></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		name: "tabbar",
		data() {
			return {
			};
		},
		props: ["value"],
		onLoad() {
			this.value1 = this.value
			console.log(this.value)
		},
		computed: {
			value1() {
				return this.value | 0
			}
		},
		methods: {
			click1() {
				uni.switchTab({
					url: "/pages/view/index"
				});
			},
			// click2() {
			// 	uni.switchTab({
			// 		url: "/pages/main/index"
			// 	});
			// },
			click3() {
				uni.switchTab({
					url: '/pages/user/index'
				})
			},
			change1() {

			}
		}
	}
</script>

<style lang="scss">
	.tabbar {}
</style>
